home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Source Code / C++ / Snippets / AppLauncher 1.0d0 / _(original postings) / UAEFinder.h < prev    next >
Encoding:
Text File  |  1995-02-25  |  1.7 KB  |  62 lines  |  [TEXT/CWIE]

  1. //-------------------------------------------------------------------------------
  2. // UAEFinder.h            Originally by Peter N Lewis (peter@mail.peter.com.au)
  3. //                        Converted to C++ by Gilles Dignard (gdignard@hookup.net)
  4. //-------------------------------------------------------------------------------
  5. #pragma once
  6.  
  7. const OSType application = 'APPL';
  8.  
  9. class UAEFinder
  10. {
  11. public:
  12.     static Boolean    TellFinderToLaunch    (FSSpec&    ioSpec,
  13.                                          Boolean    inToFront);
  14.     
  15.     static Boolean    OpenControlPanel    (OSType        inCreator);
  16.     
  17.     static void        LaunchWithDocument    (OSType        inCreator,
  18.                                          OSType        inType,
  19.                                          FSSpec&    inSpec,
  20.                                          Boolean    inToFront);
  21.     
  22.     static void        LaunchApp            (OSType        inCreator,
  23.                                          OSType        inType,
  24.                                          Boolean    inToFront);
  25.     
  26.     static void        LaunchFSSpec        (FSSpec&    ioSpec,
  27.                                          Boolean    inToFront);
  28.     
  29.     static void        QuitApplication        (OSType        inCreator,
  30.                                          OSType        inType);
  31.     
  32.  
  33.     //
  34.     // Other useful procedures. Not strictly AE, but ones used
  35.     // by the AE routines.
  36.     //
  37.     static OSErr    FindApplication     (OSType        inCreator,
  38.                                          FSSpec&    ioSpec);
  39.  
  40.     static Boolean    FindProcess            (OSType                    inCreator,
  41.                                          OSType                    inType,
  42.                                          ProcessSerialNumber&    ioProcess,
  43.                                          FSSpec&                ioSpec);
  44.  
  45.     static OSErr    FindControlPanel    (OSType        inCreator,
  46.                                          FSSpec&    ioSpec);
  47.  
  48.  
  49. private:
  50.     static Boolean    BTST                (long            inLong,
  51.                                          short            inBitNo);
  52.     
  53.     static void        PrepareToLaunch        (AppleEvent&            ioEvent,
  54.                                          Boolean                toFront,
  55.                                          AEDesc&                ioLaunchDesc,
  56.                                          LaunchParamBlockRec&    ioLaunchThis);
  57.  
  58.     static void        AddFSSToAEList        (AEDescList&    ioList,
  59.                                          short            inRow,
  60.                                          FSSpec&        ioSpec);
  61. };
  62.